<extend name="./Common/View/Public/form.html" />
<block name="page_title">添加应用</block>
<block name="main">
    <form class="layui-form" method="post" action="sys/application/update" lay-filter="pageForm">
        <input type="hidden" name="id" value="{$data.id}">
        <div class="layui-form-item">
            <label class="layui-form-label">应用名称</label>
            <div class="layui-input-inline">
                <input type="text" name="title" value="{$data.title}" maxlength="50" minlength="1" required lay-verify="required|length" placeholder="请输入应用名称" autocomplete="off" class="layui-input" />
            </div>
            <div class="layui-form-mid layui-word-aux">1-6个英文或汉字</div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">应用地址</label>
            <div class="layui-input-block">
                <input type="text" name="url" value="{$data.url}" maxlength="200" minlength="1" required lay-verify="required|length" placeholder="内置模块请输入模块代码，扩展或外部应用请输入访问入口地址" autocomplete="off" class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">应用类型</label>
            <div class="layui-input-block">
                {:W('Todo/Dict/radio',array('APP_TYPE','type',$data['type']))}
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">应用状态</label>
            <div class="layui-input-block">
                {:W('Todo/Dict/radio',array('STATUS','status',$data['status']))}
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">展示排序</label>
            <div class="layui-input-inline">
                <input type="number" name="sort" required lay-verify="required|int" value="{$data.sort}" autocomplete="off" class="layui-input" />
            </div>
            <div class="layui-form-mid layui-word-aux">从小到大排序</div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">应用说明</label>
            <div class="layui-input-block">
                <textarea name="remark" placeholder="应用描述说明" class="layui-textarea">{$data.remark}</textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="pageForm">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>
</block>